package shenxg.game;

import java.awt.Color;

public class OriginalItem {
	/*
	 *  All_Original_Items[x][y]
	 *  [0][0]  [1][0] [2][0]...[9][0]
	 *  [0][1]  [1][1] [2][1]...[9][1]
	 *  ..............................
	 *  [0][9]  [1][9] [2][9]...[9][9]
	 */
	public static final OriginalItem All_Original_Items[][] = new OriginalItem[Scene.X_LENGTH][Scene.Y_LENGTH];
	
	public final int position_x;
	public final int position_y;
	public final ColorType colorType;
	
	public OriginalItem(int x, int y, Color color) throws Exception {
		if (!Item.isCorrectPoint(x, y)) {
			throw new Exception("position value failed!!");
		}
		position_x = x;
		position_y = y;
		colorType = ColorType.getColorType(color);
		if(null == colorType){
			throw new Exception("No Color!!");
		}
		All_Original_Items[x][y] = this;
	}
}
